Package-level declarations

Types

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class InternalToolContextApi
Link copied to clipboard
data class Parameter(val name: String, val type: Parameter.Type, val description: String, val required: Boolean = true, val enum: List<String>? = null, val elementType: Parameter.Type? = null)

Represents a parameter for configuring tools or functions, including its name, type, description, and additional metadata such as whether it is required or accepts enumerated values.

Link copied to clipboard
class Tool(val name: String, val description: String, val parameters: List<Parameter>, handler: suspend (Map<String, Any>, ToolContext) -> ToolResult)

Represents an executable tool with a defined structure, parameters, and result handler.

Link copied to clipboard
interface ToolContext

Represents a context object that provides contextual data to tools during execution. Implementations of this interface may supply platform-specific information, such as a reference to the player executing a command or other relevant data.

Link copied to clipboard
sealed interface ToolResult

Represents the result of executing a tool.

Properties

Link copied to clipboard

Provides a convenient extension property to retrieve the Bukkit Player instance, if available, associated with a given ToolContext.

Functions

Link copied to clipboard

Converts a KType to a pair of Parameter.Type representations.